"""
jieba 三种分词模式
"""

import jieba


sentence = '郭靖和哀牢山三十六剑'

"""精确模式（默认模式）
jiaba.lcut() 返回列表list
jieba.cut() 返回生成器generator
"""
words1 = jieba.cut(sentence)
print('/'.join(words1)) # 郭靖/和/哀牢山/三十六/剑

"""全模式
jieba.lcut(sentence, cut_all=True)
"""
words2 = jieba.lcut(sentence, cut_all=True)
print('/'.join(words2)) # 郭/靖/和/哀牢山/三十/三十六/十六/剑

"""搜索引擎模式
jieba.cut_for_search()
"""
words3 = jieba.lcut_for_search(sentence)
print('/'.join(words3)) # 郭靖/和/哀牢山/三十/十六/三十六/剑